<?php
/*
 * @Descripttion: http 服务的路由配置文件。路由配置格式如下：
 *      [
            'namespace_prefix' => '\\app\\http\\controller\\api\\',     // 控制器所在命名空间前缀
            'url_prefix' => '/api/',        // url 前缀
            'route' => [    // 具体路由定义
                ['get', '/', 'Index@index'], // 无参数,当访问路径是 / 时,交由 \app\http\controller\api\Index 类的 index 方法处理
                ['get', '/user/{id}', 'User@getUser'], // 参数必须
                ['get', '/hello/[{name}]', 'Index@hello'], // 参数可选
            ],
        ]
 * s所有路由均按照此方式分组定义
 * @version: 
 * @Author: ewgof
 * @Date: 2020-08-10 23:15:46
 * @LastEditors: ewgof
 * @LastEditTime: 2020-10-06 14:41:02
 */
return [
    [
        'namespace_prefix' => 'app\\http\\controller\\api\\',
        'url_prefix' => '/api/',
        'route' => [
            ['get', '/', 'Index@index'],
            ['post', '/login', 'Login@login'],
            ['post', '/register', 'Login@register'],
            ['post', '/resetpassword', 'Login@resetPassword'],
            ['post', '/userupload', 'Upload@userUpload'],
            ['post', '/guestupload', 'Upload@guestUpload'],
            ['get', '/userimgs', 'Index@userImages'],
            ['get', '/guestimgs', 'Index@guestImages'],
            ['get', '/imgdetail', 'Index@imgDetail'],
            ['get', '/deleteimg', 'Index@deleteImg'],
            ['get', '/logout', 'Login@logout'],
            ['get', '/addviews', 'Index@addViews'],
        ],
    ],
    [
        'namespace_prefix' => 'app\\http\\controller\\admin\\',
        'url_prefix' => '/admin/',
        'route' => [
            ['post', '/login', 'Login@login'],
            ['get', '/logout', 'Login@logout'],
            ['get', '/userlist', 'Users@index'],
            ['post', '/lock', 'Users@lock'],
            ['post', '/userdelete', 'Users@delete'],
            ['post', '/resetspaces', 'Users@resetSpaces'],
            ['get', '/adminlist', 'Admin@index'],
            ['post', '/admincreate', 'Admin@create'],
            ['get', '/admininfo', 'Admin@edit'],
            ['post', '/adminupdate', 'Admin@update'],
            ['post', '/admindelete', 'Admin@delete'],
            ['get', '/allimages', 'Images@index'],
            ['post', '/imgdelete', 'Images@deleteImg'],
            ['get', '/sysconfig', 'WebsiteConfig@info'],
            ['post', '/sysset', 'WebsiteConfig@set'],
            ['get', '/newlyadd', 'Index@newlyAdd'],
        ],
    ],
];